﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using HigLabo.WindowsAzure.RestService.Extensions;

namespace HigLabo.WindowsAzure.RestService.SqlAzureManagement
{
    public class Server
    {
        public static readonly String ElementName = "Server";
        public String Name { get; private set; }
        public String AdministratorLogin { get; private set; }
        public String Location { get; private set; }
        public Server(XElement xml)
        {
            if (xml == null)
            {
                throw new ArgumentNullException("xml");
            }
            this.Name = xml.ValueOrEmpty("Name");
            this.AdministratorLogin = xml.ValueOrEmpty("AdministratorLogin");
            this.Location = xml.ValueOrEmpty("Location");
        }
    }
}
